aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/groups/[groupId]/reimbursement-list.tsx
diff options
context:
space:
mode:
authorSebastien Castiel <sebastien@castiel.me>2023-12-07 11:11:53 -0500
committerSebastien Castiel <sebastien@castiel.me>2023-12-07 11:11:53 -0500
commit6611e3a187e5398f686449938b7cf1ddbfcb5392 (patch)
tree0fae44f29faf8efa68bcdb113ae1ca003cbd024b /src/app/groups/[groupId]/reimbursement-list.tsx
parentec981fd237a50dfc547d8c162b22f4e1a691c9fc (diff)
Store amounts as cents
Diffstat (limited to 'src/app/groups/[groupId]/reimbursement-list.tsx')
-rw-r--r--src/app/groups/[groupId]/reimbursement-list.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/app/groups/[groupId]/reimbursement-list.tsx b/src/app/groups/[groupId]/reimbursement-list.tsx
index e8400ca..54ee9d7 100644
--- a/src/app/groups/[groupId]/reimbursement-list.tsx
+++ b/src/app/groups/[groupId]/reimbursement-list.tsx
@@ -16,6 +16,14 @@ export function ReimbursementList({
currency,
groupId,
}: Props) {
+ if (reimbursements.length === 0) {
+ return (
+ <p className="px-6 text-sm pb-6">
+ It looks like your group doesn’t need any reimbursement 😁
+ </p>
+ )
+ }
+
const getParticipant = (id: string) => participants.find((p) => p.id === id)
return (
<div className="text-sm">
@@ -35,7 +43,7 @@ export function ReimbursementList({
</Button>
</div>
<div>
- {currency} {reimbursement.amount.toFixed(2)}
+ {currency} {(reimbursement.amount / 100).toFixed(2)}
</div>
</div>
))}